from redis import Redis

#创建数据库的连接对象
rs = Redis(host="127.0.0.1",port="6379",db=0,decode_responses=True)


# 操作数据库
rs.set("name","lisi")
print(rs.get("name"))

rs.mset({"name":"zs","age":20,"height":1.80})
print(rs.mget(["name", "age", "height"]))